<?php

require_once dirname(__FILE__).'/../lib/vendor/symfony/lib/autoload/sfCoreAutoload.class.php';
sfCoreAutoload::register();

class ProjectConfiguration extends sfProjectConfiguration
{
  public function setup()
  {
    $this->enablePlugins('sfDoctrinePlugin',
                         'sfDoctrineGuardPlugin');
  }

  public function configureDoctrine(Doctrine_Manager $manager) 
  { 
    $cacheConn = Doctrine_Manager::connection(new PDO('sqlite::memory:'));
    $cacheDriver = new Doctrine_Cache_Db(array('connection' => $cacheConn, 'tableName' =>'cache'));
    $cacheDriver->createTable();

    $manager->setAttribute(Doctrine_Core::ATTR_QUERY_CACHE, $cacheDriver);
//    $manager->setAttribute(Doctrine_Core::ATTR_USE_DQL_CALLBACKS, true);
  }
}
